package hanshunping.project.tankWar;

import java.util.HashSet;
import java.util.Set;

public class Tank {
    int x;
    int y;

    public Tank(int x, int y) {
        this.x = x;
        this.y = y;
    }

    public void setX(int x) {
        this.x = x;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getX() {
        return x;
    }

    public int getY() {
        return y;
    }
}


class TankA extends Tank{
    HashSet<Shot> bullets = new HashSet<>();
    public TankA(int x, int y) {
        super(x, y);
    }
    void shot(){
        Shot bull = new Shot(x, y+13,10);
        bullets.add(bull);
        new Thread(bull).start();
    }
}